package com.klb.action.admin;

import com.klb.service.admin.impl.LoginServiceAdminImpl;
import com.opensymphony.xwork2.ActionSupport;

/**
 * Created by fujia on 2016/7/2.
 */
public class LoginActionAdmin extends ActionSupport {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String username;
    private String password;
    
    private LoginServiceAdminImpl loginServiceAdmin;

    

    public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}


	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}




	public void setLoginServiceAdmin(LoginServiceAdminImpl loginServiceAdmin) {
		this.loginServiceAdmin = loginServiceAdmin;
	}



	@Override
    public String execute() throws Exception {
        if (this.loginServiceAdmin.loginIsSuccess(this.username, this.password))
            return SUCCESS;

        return INPUT;
    }


}
